/* 通用页面样式 */
.page-card {
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-background);
  transition: all 0.2s ease;
}

.page-card .ant-card-head {
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 24px;
  position: relative;
}

.page-card .ant-card-head::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.page-card .ant-card-head:hover::before {
  opacity: 1;
}

.page-card .ant-card-head-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-card .ant-card-body {
  padding: 24px;
  background: var(--color-background);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 通用空状态样式 */
.page-empty {
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease;
}

.page-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.7;
  display: block;
}

.page-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.page-empty-description {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 终端页面特殊样式 */
.terminal-page .page-empty-icon {
  font-size: 72px;
}

.terminal-card .ant-card-head-title::before {
  content: '💻';
}

/* 文件管理页面特殊样式 */
.files-page .page-empty-icon {
  font-size: 72px;
}

.files-card .ant-card-head-title::before {
  content: '📁';
}

/* AI助手页面特殊样式 */
.ai-assistant-page .page-empty-icon {
  font-size: 72px;
  animation: pulse 2s ease-in-out infinite;
}

.ai-assistant-card .ant-card-head-title::before {
  content: '🤖';
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* 设置页面特殊样式 */
.settings-page .settings-content {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.settings-section {
  margin-bottom: 32px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.settings-section:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
}

.settings-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section p {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.settings-card .ant-card-head-title::before {
  content: '⚙️';
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-card .ant-card-head {
    padding: 12px 16px;
  }

  .page-card .ant-card-head-title {
    font-size: 16px;
  }

  .page-card .ant-card-body {
    padding: 16px;
    min-height: 300px;
  }

  .page-empty {
    max-width: 100%;
    padding: 0 16px;
  }

  .page-empty-icon {
    font-size: 48px;
  }

  .settings-section {
    padding: 16px;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .page-card .ant-card-head {
    padding: 12px;
  }

  .page-card .ant-card-body {
    padding: 12px;
  }

  .page-empty-icon {
    font-size: 40px;
  }

  .settings-section {
    padding: 12px;
  }
}

/* 深色主题适配 */
[data-theme="dark"] .page-card .ant-card-head {
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(0, 0, 0, 0.2) 100%);
}

[data-theme="dark"] .page-card .ant-card-body {
  background: var(--color-background);
}

[data-theme="dark"] .settings-section {
  background: rgba(0, 0, 0, 0.2);
  border-color: var(--color-border);
}

[data-theme="dark"] .settings-section:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(102, 126, 234, 0.3);
}

/* 加载状态 */
.page-card.loading .ant-card-body {
  opacity: 0.6;
  pointer-events: none;
}

.page-card.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}